home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1996-10-08 | 4.9 KB | [TEXT/CWIE] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| Compact Compressed (Unix) (archive/compact)
| ext
| Supported |
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Tue Oct 8 11:53:59 1996, modified Tue Oct 8 11:53:59 1996, creator 'CWIE', type ASCII, 4346 bytes "DemoLibGlue.c" , at 0x117a 456 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [CWIE] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0d 44 65 6d 6f 4c 69 | 62 47 6c 75 65 2e 63 00 |..DemoLi|bGlue.c.|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 43 57 49 | 45 01 00 00 00 00 00 00 |.TEXTCWI|E.......|
|00000050| 00 00 00 00 00 10 fa 00 | 00 01 c8 ae 80 29 97 ae |........|.....)..|
|00000060| 80 29 97 00 00 0c 00 00 | 00 00 00 00 00 00 00 00 |.)......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 34 95 00 00 |........|....4...|
|00000080| 0d 2f 2a 2a 5c 0d 7c 2a | 2a 7c 09 49 6e 63 6c 75 |./**\.|*|*|.Inclu|
|00000090| 64 65 73 0d 5c 2a 2a 2f | 0d 0d 23 69 6e 63 6c 75 |des.\**/|..#inclu|
|000000a0| 64 65 20 3c 43 6f 64 65 | 46 72 61 67 6d 65 6e 74 |de <Code|Fragment|
|000000b0| 73 2e 68 3e 0d 23 69 6e | 63 6c 75 64 65 20 22 44 |s.h>.#in|clude "D|
|000000c0| 65 6d 6f 4c 69 62 2e 68 | 22 0d 0d 2f 2a 2a 5c 0d |emoLib.h|"../**\.|
|000000d0| 7c 2a 2a 7c 09 50 72 69 | 76 61 74 65 20 66 75 6e ||**|.Pri|vate fun|
|000000e0| 63 74 69 6f 6e 20 70 72 | 6f 74 6f 74 79 70 65 73 |ction pr|ototypes|
|000000f0| 0d 5c 2a 2a 2f 0d 0d 73 | 74 61 74 69 63 20 4f 53 |.\**/..s|tatic OS|
|00000100| 45 72 72 20 46 69 6e 64 | 5f 53 79 6d 62 6f 6c 28 |Err Find|_Symbol(|
|00000110| 50 74 72 2a 20 70 53 79 | 6d 41 64 64 72 2c 0d 09 |Ptr* pSy|mAddr,..|
|00000120| 09 09 09 09 09 20 53 74 | 72 32 35 35 20 70 53 79 |..... St|r255 pSy|
|00000130| 6d 4e 61 6d 65 2c 0d 09 | 09 09 09 09 09 20 50 72 |mName,..|..... Pr|
|00000140| 6f 63 49 6e 66 6f 54 79 | 70 65 20 70 50 72 6f 63 |ocInfoTy|pe pProc|
|00000150| 49 6e 66 6f 29 3b 0d 0d | 73 74 61 74 69 63 20 70 |Info);..|static p|
|00000160| 61 73 63 61 6c 20 4f 53 | 45 72 72 20 47 65 74 53 |ascal OS|Err GetS|
|00000170| 79 73 74 65 6d 41 72 63 | 68 69 74 65 63 74 75 72 |ystemArc|hitectur|
|00000180| 65 28 4f 53 54 79 70 65 | 20 2a 61 72 63 68 54 79 |e(OSType| *archTy|
|00000190| 70 65 29 3b 0d 0d 2f 2a | 2a 5c 0d 7c 2a 2a 7c 09 |pe);../*|*\.|**|.|
|000001a0| 50 72 69 76 61 74 65 20 | 66 75 6e 63 74 69 6f 6e |Private |function|
|000001b0| 73 0d 5c 2a 2a 2f 0d 0d | 73 74 61 74 69 63 20 70 |s.\**/..|static p|
|000001c0| 61 73 63 61 6c 20 4f 53 | 45 72 72 20 47 65 74 53 |ascal OS|Err GetS|
|000001d0| 79 73 74 65 6d 41 72 63 | 68 69 74 65 63 74 75 72 |ystemArc|hitectur|
|000001e0| 65 28 4f 53 54 79 70 65 | 20 2a 61 72 63 68 54 79 |e(OSType| *archTy|
|000001f0| 70 65 29 0d 7b 0d 09 73 | 74 61 74 69 63 20 6c 6f |pe).{..s|tatic lo|
|00000200| 6e 67 20 73 53 79 73 41 | 72 63 68 69 74 65 63 74 |ng sSysA|rchitect|
|00000210| 75 72 65 20 3d 20 30 3b | 09 2f 2f 20 73 74 61 74 |ure = 0;|.// stat|
|00000220| 69 63 20 73 6f 20 77 65 | 20 6f 6e 6c 79 20 47 65 |ic so we| only Ge|
|00000230| 73 74 61 6c 74 20 74 68 | 65 20 66 69 72 73 74 20 |stalt th|e first |
|00000240| 74 69 6d 65 0d 09 4f 53 | 45 72 72 09 74 4f 53 45 |time..OS|Err.tOSE|
|00000250| 72 72 20 3d 20 6e 6f 45 | 72 72 3b 0d 0d 09 2a 61 |rr = noE|rr;...*a|
|00000260| 72 63 68 54 79 70 65 20 | 3d 20 6b 41 6e 79 43 46 |rchType |= kAnyCF|
|00000270| 72 61 67 41 72 63 68 3b | 09 09 09 2f 2f 20 61 73 |ragArch;|...// as|
|00000280| 73 75 6d 65 20 77 69 6c | 64 20 61 72 63 68 69 74 |sume wil|d archit|
|00000290| 65 63 74 75 72 65 0d 0d | 09 2f 2f 20 49 66 20 77 |ecture..|.// If w|
|000002a0| 65 20 64 6f 6e 27 74 20 | 6b 6e 6f 77 20 74 68 65 |e don't |know the|
|000002b0| 20 73 79 73 74 65 6d 20 | 61 72 63 68 69 74 65 63 | system |architec|
|000002c0| 74 75 72 65 20 79 65 74 | c9 0d 09 69 66 20 28 73 |ture yet|...if (s|
|000002d0| 53 79 73 41 72 63 68 69 | 74 65 63 74 75 72 65 20 |SysArchi|tecture |
|000002e0| 3d 3d 20 30 29 0d 09 09 | 2f 2f 20 c9 41 73 6b 20 |== 0)...|// .Ask |
|000002f0| 47 65 73 74 61 6c 74 20 | 77 68 61 74 20 6b 69 6e |Gestalt |what kin|
|00000300| 64 20 6f 66 20 6d 61 63 | 68 69 6e 65 20 77 65 20 |d of mac|hine we |
|00000310| 61 72 65 20 72 75 6e 6e | 69 6e 67 20 6f 6e 2e 0d |are runn|ing on..|
|00000320| 09 09 74 4f 53 45 72 72 | 20 3d 20 47 65 73 74 61 |..tOSErr| = Gesta|
|00000330| 6c 74 28 67 65 73 74 61 | 6c 74 53 79 73 41 72 63 |lt(gesta|ltSysArc|
|00000340| 68 69 74 65 63 74 75 72 | 65 2c 20 26 73 53 79 73 |hitectur|e, &sSys|
|00000350| 41 72 63 68 69 74 65 63 | 74 75 72 65 29 3b 0d 0d |Architec|ture);..|
|00000360| 09 69 66 20 28 74 4f 53 | 45 72 72 20 3d 3d 20 6e |.if (tOS|Err == n|
|00000370| 6f 45 72 72 29 09 2f 2f | 20 69 66 20 6e 6f 20 65 |oErr).//| if no e|
|00000380| 72 72 6f 72 73 0d 09 7b | 0d 09 09 69 66 20 28 73 |rrors..{|...if (s|
|00000390| 53 79 73 41 72 63 68 69 | 74 65 63 74 75 72 65 20 |SysArchi|tecture |
|000003a0| 3d 3d 20 67 65 73 74 61 | 6c 74 36 38 6b 29 09 09 |== gesta|lt68k)..|
|000003b0| 09 09 2f 2f 20 36 38 6b | 3f 0d 09 09 09 2a 61 72 |..// 68k|?....*ar|
|000003c0| 63 68 54 79 70 65 20 3d | 20 6b 4d 6f 74 6f 72 6f |chType =| kMotoro|
|000003d0| 6c 61 36 38 4b 43 46 72 | 61 67 41 72 63 68 3b 0d |la68KCFr|agArch;.|
|000003e0| 09 09 65 6c 73 65 20 69 | 66 20 28 73 53 79 73 41 |..else i|f (sSysA|
|000003f0| 72 63 68 69 74 65 63 74 | 75 72 65 20 3d 3d 20 67 |rchitect|ure == g|
|00000400| 65 73 74 61 6c 74 50 6f | 77 65 72 50 43 29 09 2f |estaltPo|werPC)./|
|00000410| 2f 20 50 50 43 3f 0d 09 | 09 09 2a 61 72 63 68 54 |/ PPC?..|..*archT|
|00000420| 79 70 65 20 3d 20 6b 50 | 6f 77 65 72 50 43 43 46 |ype = kP|owerPCCF|
|00000430| 72 61 67 41 72 63 68 3b | 0d 09 09 65 6c 73 65 0d |ragArch;|...else.|
|00000440| 09 09 09 74 4f 53 45 72 | 72 20 3d 20 67 65 73 74 |...tOSEr|r = gest|
|00000450| 61 6c 74 55 6e 6b 6e 6f | 77 6e 45 72 72 3b 09 09 |altUnkno|wnErr;..|
|00000460| 09 09 09 2f 2f 20 77 68 | 6f 20 6b 6e 6f 77 73 20 |...// wh|o knows |
|00000470| 77 68 61 74 20 6d 69 67 | 68 74 20 62 65 20 6e 65 |what mig|ht be ne|
|00000480| 78 74 3f 0d 09 7d 0d 09 | 72 65 74 75 72 6e 20 74 |xt?..}..|return t|
|00000490| 4f 53 45 72 72 3b 0d 7d | 0d 0d 73 74 61 74 69 63 |OSErr;.}|..static|
|000004a0| 20 4f 53 45 72 72 20 46 | 69 6e 64 5f 53 79 6d 62 | OSErr F|ind_Symb|
|000004b0| 6f 6c 28 50 74 72 2a 20 | 70 53 79 6d 41 64 64 72 |ol(Ptr* |pSymAddr|
|000004c0| 2c 0d 09 09 09 09 09 09 | 20 53 74 72 32 35 35 20 |,.......| Str255 |
|000004d0| 70 53 79 6d 4e 61 6d 65 | 2c 0d 09 09 09 09 09 09 |pSymName|,.......|
|000004e0| 20 50 72 6f 63 49 6e 66 | 6f 54 79 70 65 20 70 50 | ProcInf|oType pP|
|000004f0| 72 6f 63 49 6e 66 6f 29 | 0d 7b 0d 09 73 74 61 74 |rocInfo)|.{..stat|
|00000500| 69 63 20 43 6f 6e 6e 65 | 63 74 69 6f 6e 49 44 20 |ic Conne|ctionID |
|00000510| 73 43 49 44 20 3d 20 30 | 3b 0d 09 73 74 61 74 69 |sCID = 0|;..stati|
|00000520| 63 20 4f 53 54 79 70 65 | 20 73 41 72 63 68 54 79 |c OSType| sArchTy|
|00000530| 70 65 20 3d 20 6b 41 6e | 79 43 46 72 61 67 41 72 |pe = kAn|yCFragAr|
|00000540| 63 68 3b 0d 09 73 74 61 | 74 69 63 20 4f 53 45 72 |ch;..sta|tic OSEr|
|00000550| 72 20 73 4f 53 45 72 72 | 20 3d 20 6e 6f 45 72 72 |r sOSErr| = noErr|
|00000560| 3b 0d 0d 09 53 74 72 32 | 35 35 20 65 72 72 4d 65 |;...Str2|55 errMe|
|00000570| 73 73 61 67 65 3b 0d 09 | 50 74 72 20 6d 61 69 6e |ssage;..|Ptr main|
|00000580| 41 64 64 72 3b 0d 09 53 | 79 6d 43 6c 61 73 73 20 |Addr;..S|ymClass |
|00000590| 73 79 6d 43 6c 61 73 73 | 3b 0d 09 49 53 41 54 79 |symClass|;..ISATy|
|000005a0| 70 65 20 74 49 53 41 54 | 79 70 65 3b 0d 0d 09 69 |pe tISAT|ype;...i|
|000005b0| 66 20 28 73 41 72 63 68 | 54 79 70 65 20 3d 3d 20 |f (sArch|Type == |
|000005c0| 6b 41 6e 79 43 46 72 61 | 67 41 72 63 68 29 09 09 |kAnyCFra|gArch)..|
|000005d0| 09 09 2f 2f 20 69 66 20 | 61 72 63 68 69 74 65 63 |..// if |architec|
|000005e0| 74 75 72 65 20 69 73 20 | 73 74 69 6c 6c 20 75 6e |ture is |still un|
|000005f0| 64 65 66 69 6e 65 64 c9 | 0d 09 7b 0d 09 09 73 43 |defined.|..{...sC|
|00000600| 49 44 20 3d 20 30 3b 09 | 09 09 09 09 09 09 09 2f |ID = 0;.|......./|
|00000610| 2f 20 c9 66 6f 72 63 65 | 20 28 72 65 29 63 6f 6e |/ .force| (re)con|
|00000620| 6e 65 63 74 20 74 6f 20 | 6c 69 62 72 61 72 79 0d |nect to |library.|
|00000630| 09 09 73 4f 53 45 72 72 | 20 3d 20 47 65 74 53 79 |..sOSErr| = GetSy|
|00000640| 73 74 65 6d 41 72 63 68 | 69 74 65 63 74 75 72 65 |stemArch|itecture|
|00000650| 28 26 73 41 72 63 68 54 | 79 70 65 29 3b 09 2f 2f |(&sArchT|ype);.//|
|00000660| 20 26 20 64 65 74 65 72 | 6d 69 6e 65 20 63 75 72 | & deter|mine cur|
|00000670| 72 65 6e 74 20 61 74 63 | 68 69 74 65 63 74 75 72 |rent atc|hitectur|
|00000680| 65 2e 0d 09 09 69 66 20 | 28 73 4f 53 45 72 72 20 |e....if |(sOSErr |
|00000690| 21 3d 20 6e 6f 45 72 72 | 29 0d 09 09 09 72 65 74 |!= noErr|)....ret|
|000006a0| 75 72 6e 20 73 4f 53 45 | 72 72 3b 0d 09 7d 0d 09 |urn sOSE|rr;..}..|
|000006b0| 73 77 69 74 63 68 20 28 | 73 41 72 63 68 54 79 70 |switch (|sArchTyp|
|000006c0| 65 29 0d 09 7b 0d 09 09 | 63 61 73 65 09 6b 4d 6f |e)..{...|case.kMo|
|000006d0| 74 6f 72 6f 6c 61 36 38 | 4b 43 46 72 61 67 41 72 |torola68|KCFragAr|
|000006e0| 63 68 3a 0d 09 09 09 74 | 49 53 41 54 79 70 65 20 |ch:....t|ISAType |
|000006f0| 3d 20 6b 4d 36 38 6b 49 | 53 41 20 7c 20 6b 43 46 |= kM68kI|SA | kCF|
|00000700| 4d 36 38 6b 52 54 41 3b | 0d 09 09 09 62 72 65 61 |M68kRTA;|....brea|
|00000710| 6b 3b 0d 09 09 63 61 73 | 65 09 6b 50 6f 77 65 72 |k;...cas|e.kPower|
|00000720| 50 43 43 46 72 61 67 41 | 72 63 68 3a 0d 09 09 09 |PCCFragA|rch:....|
|00000730| 74 49 53 41 54 79 70 65 | 20 3d 20 6b 50 6f 77 65 |tISAType| = kPowe|
|00000740| 72 50 43 49 53 41 20 7c | 20 6b 50 6f 77 65 72 50 |rPCISA || kPowerP|
|00000750| 43 52 54 41 3b 0d 09 09 | 09 62 72 65 61 6b 3b 0d |CRTA;...|.break;.|
|00000760| 09 09 64 65 66 61 75 6c | 74 3a 09 2f 2f 20 77 68 |..defaul|t:.// wh|
|00000770| 6f 20 6b 6e 6f 77 73 20 | 77 68 61 74 20 6d 69 67 |o knows |what mig|
|00000780| 68 74 20 62 65 20 6e 65 | 78 74 3f 0d 09 09 09 73 |ht be ne|xt?....s|
|00000790| 4f 53 45 72 72 20 3d 20 | 67 65 73 74 61 6c 74 55 |OSErr = |gestaltU|
|000007a0| 6e 6b 6e 6f 77 6e 45 72 | 72 3b 0d 09 09 09 62 72 |nknownEr|r;....br|
|000007b0| 65 61 6b 3b 0d 09 7d 0d | 0d 09 69 66 20 28 73 43 |eak;..}.|..if (sC|
|000007c0| 49 44 20 3d 3d 20 30 29 | 09 09 09 09 09 09 09 09 |ID == 0)|........|
|000007d0| 2f 2f 20 49 66 20 77 65 | 20 68 61 76 65 6e 27 74 |// If we| haven't|
|000007e0| 20 63 6f 6e 6e 65 63 74 | 65 64 20 74 6f 20 74 68 | connect|ed to th|
|000007f0| 65 20 6c 69 62 72 61 72 | 79 20 79 65 74 c9 0d 09 |e librar|y yet...|
|00000800| 7b 0d 09 09 73 4f 53 45 | 72 72 20 3d 20 47 65 74 |{...sOSE|rr = Get|
|00000810| 53 68 61 72 65 64 4c 69 | 62 72 61 72 79 28 22 5c |SharedLi|brary("\|
|00000820| 70 44 65 6d 6f 4c 69 62 | 72 61 72 79 22 2c 73 41 |pDemoLib|rary",sA|
|00000830| 72 63 68 54 79 70 65 2c | 6b 4c 6f 61 64 43 46 72 |rchType,|kLoadCFr|
|00000840| 61 67 2c 26 73 43 49 44 | 2c 26 6d 61 69 6e 41 64 |ag,&sCID|,&mainAd|
|00000850| 64 72 2c 65 72 72 4d 65 | 73 73 61 67 65 29 3b 0d |dr,errMe|ssage);.|
|00000860| 09 09 69 66 20 28 73 4f | 53 45 72 72 20 21 3d 20 |..if (sO|SErr != |
|00000870| 6e 6f 45 72 72 29 0d 09 | 09 09 72 65 74 75 72 6e |noErr)..|..return|
|00000880| 20 73 4f 53 45 72 72 3b | 0d 09 7d 0d 0d 09 2f 2f | sOSErr;|..}...//|
|00000890| 20 49 66 20 77 65 20 68 | 61 76 65 6e 27 74 20 6c | If we h|aven't l|
|000008a0| 6f 6f 6b 65 64 20 75 70 | 20 74 68 69 73 20 73 79 |ooked up| this sy|
|000008b0| 6d 62 6f 6c 20 79 65 74 | c9 0d 09 69 66 20 28 28 |mbol yet|...if ((|
|000008c0| 50 74 72 29 20 2a 20 70 | 53 79 6d 41 64 64 72 20 |Ptr) * p|SymAddr |
|000008d0| 3d 3d 20 28 50 74 72 29 | 20 6b 55 6e 72 65 73 6f |== (Ptr)| kUnreso|
|000008e0| 6c 76 65 64 43 46 72 61 | 67 53 79 6d 62 6f 6c 41 |lvedCFra|gSymbolA|
|000008f0| 64 64 72 65 73 73 29 0d | 09 7b 0d 09 09 2f 2f 20 |ddress).|.{...// |
|00000900| c9 6c 6f 6f 6b 20 69 74 | 20 75 70 20 6e 6f 77 0d |.look it| up now.|
|00000910| 09 09 73 4f 53 45 72 72 | 20 3d 20 46 69 6e 64 53 |..sOSErr| = FindS|
|00000920| 79 6d 62 6f 6c 28 73 43 | 49 44 2c 70 53 79 6d 4e |ymbol(sC|ID,pSymN|
|00000930| 61 6d 65 2c 70 53 79 6d | 41 64 64 72 2c 26 73 79 |ame,pSym|Addr,&sy|
|00000940| 6d 43 6c 61 73 73 29 3b | 0d 09 09 69 66 20 28 73 |mClass);|...if (s|
|00000950| 4f 53 45 72 72 20 21 3d | 20 6e 6f 45 72 72 29 09 |OSErr !=| noErr).|
|00000960| 2f 2f 20 69 6e 20 63 61 | 73 65 20 6f 66 20 65 72 |// in ca|se of er|
|00000970| 72 6f 72 c9 0d 09 09 09 | 2a 28 50 74 72 2a 29 20 |ror.....|*(Ptr*) |
|00000980| 26 70 53 79 6d 41 64 64 | 72 20 3d 20 28 50 74 72 |&pSymAdd|r = (Ptr|
|00000990| 29 20 6b 55 6e 72 65 73 | 6f 6c 76 65 64 43 46 72 |) kUnres|olvedCFr|
|000009a0| 61 67 53 79 6d 62 6f 6c | 41 64 64 72 65 73 73 3b |agSymbol|Address;|
|000009b0| 09 2f 2f 20 c9 63 6c 65 | 61 72 20 74 68 65 20 70 |.// .cle|ar the p|
|000009c0| 72 6f 63 65 64 75 72 65 | 20 70 6f 69 6e 74 65 72 |rocedure| pointer|
|000009d0| 0d 23 69 66 20 21 47 45 | 4e 45 52 41 54 49 4e 47 |.#if !GE|NERATING|
|000009e0| 43 46 4d 09 2f 2f 20 69 | 66 20 74 68 69 73 20 69 |CFM.// i|f this i|
|000009f0| 73 20 63 6c 61 73 73 69 | 63 20 36 38 6b 20 63 6f |s classi|c 68k co|
|00000a00| 64 65 c9 0d 09 09 65 6c | 73 65 09 09 2f 2f 20 c9 |de....el|se..// .|
|00000a10| 63 72 65 61 74 65 20 61 | 20 72 6f 75 74 69 6e 65 |create a| routine|
|00000a20| 20 64 65 73 63 72 69 70 | 74 6f 72 c9 0d 09 09 09 | descrip|tor.....|
|00000a30| 2a 70 53 79 6d 41 64 64 | 72 20 3d 20 28 50 74 72 |*pSymAdd|r = (Ptr|
|00000a40| 29 4e 65 77 52 6f 75 74 | 69 6e 65 44 65 73 63 72 |)NewRout|ineDescr|
|00000a50| 69 70 74 6f 72 54 72 61 | 70 28 28 50 72 6f 63 50 |iptorTra|p((ProcP|
|00000a60| 74 72 29 20 2a 20 70 53 | 79 6d 41 64 64 72 2c 70 |tr) * pS|ymAddr,p|
|00000a70| 50 72 6f 63 49 6e 66 6f | 2c 74 49 53 41 54 79 70 |ProcInfo|,tISATyp|
|00000a80| 65 29 3b 0d 23 65 6e 64 | 69 66 0d 09 7d 0d 09 72 |e);.#end|if..}..r|
|00000a90| 65 74 75 72 6e 20 73 4f | 53 45 72 72 3b 0d 7d 0d |eturn sO|SErr;.}.|
|00000aa0| 0d 2f 2a 2a 5c 0d 7c 2a | 2a 7c 09 50 75 62 6c 69 |./**\.|*|*|.Publi|
|00000ab0| 63 20 66 75 6e 63 74 69 | 6f 6e 73 0d 5c 2a 2a 2f |c functi|ons.\**/|
|00000ac0| 0d 0d 70 61 73 63 61 6c | 20 76 6f 69 64 20 44 6f |..pascal| void Do|
|00000ad0| 5f 44 65 6d 6f 28 76 6f | 69 64 29 0d 7b 0d 09 73 |_Demo(vo|id).{..s|
|00000ae0| 74 61 74 69 63 20 44 6f | 5f 44 65 6d 6f 50 72 6f |tatic Do|_DemoPro|
|00000af0| 63 50 74 72 20 73 44 6f | 5f 44 65 6d 6f 50 72 6f |cPtr sDo|_DemoPro|
|00000b00| 63 50 74 72 20 3d 20 6b | 55 6e 72 65 73 6f 6c 76 |cPtr = k|Unresolv|
|00000b10| 65 64 43 46 72 61 67 53 | 79 6d 62 6f 6c 41 64 64 |edCFragS|ymbolAdd|
|00000b20| 72 65 73 73 3b 0d 0d 09 | 2f 2f 20 69 66 20 74 68 |ress;...|// if th|
|00000b30| 69 73 20 61 64 64 72 65 | 73 73 20 68 61 73 20 6e |is addre|ss has n|
|00000b40| 6f 74 20 62 65 65 6e 20 | 73 65 74 75 70 20 79 65 |ot been |setup ye|
|00000b50| 74 c9 0d 09 69 66 20 28 | 28 50 74 72 29 20 73 44 |t...if (|(Ptr) sD|
|00000b60| 6f 5f 44 65 6d 6f 50 72 | 6f 63 50 74 72 20 3d 3d |o_DemoPr|ocPtr ==|
|00000b70| 20 28 50 74 72 29 20 6b | 55 6e 72 65 73 6f 6c 76 | (Ptr) k|Unresolv|
|00000b80| 65 64 43 46 72 61 67 53 | 79 6d 62 6f 6c 41 64 64 |edCFragS|ymbolAdd|
|00000b90| 72 65 73 73 29 0d 09 09 | 46 69 6e 64 5f 53 79 6d |ress)...|Find_Sym|
|00000ba0| 62 6f 6c 28 28 50 74 72 | 2a 29 20 26 73 44 6f 5f |bol((Ptr|*) &sDo_|
|00000bb0| 44 65 6d 6f 50 72 6f 63 | 50 74 72 2c 22 5c 70 44 |DemoProc|Ptr,"\pD|
|00000bc0| 6f 5f 44 65 6d 6f 22 2c | 6b 44 6f 5f 44 65 6d 6f |o_Demo",|kDo_Demo|
|00000bd0| 50 72 6f 63 49 6e 66 6f | 29 3b 0d 09 69 66 20 28 |ProcInfo|);..if (|
|00000be0| 28 50 74 72 29 20 73 44 | 6f 5f 44 65 6d 6f 50 72 |(Ptr) sD|o_DemoPr|
|00000bf0| 6f 63 50 74 72 20 21 3d | 20 28 50 74 72 29 20 6b |ocPtr !=| (Ptr) k|
|00000c00| 55 6e 72 65 73 6f 6c 76 | 65 64 43 46 72 61 67 53 |Unresolv|edCFragS|
|00000c10| 79 6d 62 6f 6c 41 64 64 | 72 65 73 73 29 0d 09 09 |ymbolAdd|ress)...|
|00000c20| 73 44 6f 5f 44 65 6d 6f | 50 72 6f 63 50 74 72 28 |sDo_Demo|ProcPtr(|
|00000c30| 29 3b 0d 7d 0d 0d 70 61 | 73 63 61 6c 20 76 6f 69 |);.}..pa|scal voi|
|00000c40| 64 20 53 65 74 5f 44 65 | 6d 6f 56 61 6c 75 65 28 |d Set_De|moValue(|
|00000c50| 6c 6f 6e 67 20 70 4c 6f | 6e 67 29 0d 7b 0d 09 73 |long pLo|ng).{..s|
|00000c60| 74 61 74 69 63 20 53 65 | 74 5f 44 65 6d 6f 56 61 |tatic Se|t_DemoVa|
|00000c70| 6c 75 65 50 72 6f 63 50 | 74 72 09 73 53 65 74 5f |lueProcP|tr.sSet_|
|00000c80| 44 65 6d 6f 56 61 6c 75 | 65 50 72 6f 63 50 74 72 |DemoValu|eProcPtr|
|00000c90| 20 3d 20 6b 55 6e 72 65 | 73 6f 6c 76 65 64 43 46 | = kUnre|solvedCF|
|00000ca0| 72 61 67 53 79 6d 62 6f | 6c 41 64 64 72 65 73 73 |ragSymbo|lAddress|
|00000cb0| 3b 0d 0d 09 2f 2f 20 69 | 66 20 74 68 69 73 20 61 |;...// i|f this a|
|00000cc0| 64 64 72 65 73 73 20 68 | 61 73 20 6e 6f 74 20 62 |ddress h|as not b|
|00000cd0| 65 65 6e 20 73 65 74 75 | 70 20 79 65 74 c9 0d 09 |een setu|p yet...|
|00000ce0| 69 66 20 28 28 50 74 72 | 29 20 73 53 65 74 5f 44 |if ((Ptr|) sSet_D|
|00000cf0| 65 6d 6f 56 61 6c 75 65 | 50 72 6f 63 50 74 72 20 |emoValue|ProcPtr |
|00000d00| 3d 3d 20 28 50 74 72 29 | 20 6b 55 6e 72 65 73 6f |== (Ptr)| kUnreso|
|00000d10| 6c 76 65 64 43 46 72 61 | 67 53 79 6d 62 6f 6c 41 |lvedCFra|gSymbolA|
|00000d20| 64 64 72 65 73 73 29 0d | 09 09 46 69 6e 64 5f 53 |ddress).|..Find_S|
|00000d30| 79 6d 62 6f 6c 28 28 50 | 74 72 2a 29 20 26 73 53 |ymbol((P|tr*) &sS|
|00000d40| 65 74 5f 44 65 6d 6f 56 | 61 6c 75 65 50 72 6f 63 |et_DemoV|alueProc|
|00000d50| 50 74 72 2c 22 5c 70 53 | 65 74 5f 44 65 6d 6f 56 |Ptr,"\pS|et_DemoV|
|00000d60| 61 6c 75 65 22 2c 6b 53 | 65 74 5f 44 65 6d 6f 56 |alue",kS|et_DemoV|
|00000d70| 61 6c 75 65 50 72 6f 63 | 49 6e 66 6f 29 3b 0d 09 |alueProc|Info);..|
|00000d80| 69 66 20 28 28 50 74 72 | 29 20 73 53 65 74 5f 44 |if ((Ptr|) sSet_D|
|00000d90| 65 6d 6f 56 61 6c 75 65 | 50 72 6f 63 50 74 72 20 |emoValue|ProcPtr |
|00000da0| 21 3d 20 28 50 74 72 29 | 20 6b 55 6e 72 65 73 6f |!= (Ptr)| kUnreso|
|00000db0| 6c 76 65 64 43 46 72 61 | 67 53 79 6d 62 6f 6c 41 |lvedCFra|gSymbolA|
|00000dc0| 64 64 72 65 73 73 29 0d | 09 09 73 53 65 74 5f 44 |ddress).|..sSet_D|
|00000dd0| 65 6d 6f 56 61 6c 75 65 | 50 72 6f 63 50 74 72 28 |emoValue|ProcPtr(|
|00000de0| 70 4c 6f 6e 67 29 3b 0d | 7d 0d 0d 70 61 73 63 61 |pLong);.|}..pasca|
|00000df0| 6c 20 6c 6f 6e 67 20 47 | 65 74 5f 44 65 6d 6f 56 |l long G|et_DemoV|
|00000e00| 61 6c 75 65 28 76 6f 69 | 64 29 0d 7b 0d 09 73 74 |alue(voi|d).{..st|
|00000e10| 61 74 69 63 20 47 65 74 | 5f 44 65 6d 6f 56 61 6c |atic Get|_DemoVal|
|00000e20| 75 65 50 72 6f 63 50 74 | 72 09 73 47 65 74 5f 44 |ueProcPt|r.sGet_D|
|00000e30| 65 6d 6f 56 61 6c 75 65 | 50 72 6f 63 50 74 72 20 |emoValue|ProcPtr |
|00000e40| 3d 20 6b 55 6e 72 65 73 | 6f 6c 76 65 64 43 46 72 |= kUnres|olvedCFr|
|00000e50| 61 67 53 79 6d 62 6f 6c | 41 64 64 72 65 73 73 3b |agSymbol|Address;|
|00000e60| 0d 0d 09 2f 2f 20 69 66 | 20 74 68 69 73 20 61 64 |...// if| this ad|
|00000e70| 64 72 65 73 73 20 68 61 | 73 20 6e 6f 74 20 62 65 |dress ha|s not be|
|00000e80| 65 6e 20 73 65 74 75 70 | 20 79 65 74 c9 0d 09 69 |en setup| yet...i|
|00000e90| 66 20 28 28 50 74 72 29 | 20 73 47 65 74 5f 44 65 |f ((Ptr)| sGet_De|
|00000ea0| 6d 6f 56 61 6c 75 65 50 | 72 6f 63 50 74 72 20 3d |moValueP|rocPtr =|
|00000eb0| 3d 20 28 50 74 72 29 20 | 6b 55 6e 72 65 73 6f 6c |= (Ptr) |kUnresol|
|00000ec0| 76 65 64 43 46 72 61 67 | 53 79 6d 62 6f 6c 41 64 |vedCFrag|SymbolAd|
|00000ed0| 64 72 65 73 73 29 0d 09 | 09 46 69 6e 64 5f 53 79 |dress)..|.Find_Sy|
|00000ee0| 6d 62 6f 6c 28 28 50 74 | 72 2a 29 20 26 73 47 65 |mbol((Pt|r*) &sGe|
|00000ef0| 74 5f 44 65 6d 6f 56 61 | 6c 75 65 50 72 6f 63 50 |t_DemoVa|lueProcP|
|00000f00| 74 72 2c 22 5c 70 47 65 | 74 5f 44 65 6d 6f 56 61 |tr,"\pGe|t_DemoVa|
|00000f10| 6c 75 65 22 2c 6b 47 65 | 74 5f 44 65 6d 6f 56 61 |lue",kGe|t_DemoVa|
|00000f20| 6c 75 65 50 72 6f 63 49 | 6e 66 6f 29 3b 0d 09 69 |lueProcI|nfo);..i|
|00000f30| 66 20 28 28 50 74 72 29 | 20 73 47 65 74 5f 44 65 |f ((Ptr)| sGet_De|
|00000f40| 6d 6f 56 61 6c 75 65 50 | 72 6f 63 50 74 72 20 21 |moValueP|rocPtr !|
|00000f50| 3d 20 28 50 74 72 29 20 | 6b 55 6e 72 65 73 6f 6c |= (Ptr) |kUnresol|
|00000f60| 76 65 64 43 46 72 61 67 | 53 79 6d 62 6f 6c 41 64 |vedCFrag|SymbolAd|
|00000f70| 64 72 65 73 73 29 0d 09 | 09 72 65 74 75 72 6e 20 |dress)..|.return |
|00000f80| 73 47 65 74 5f 44 65 6d | 6f 56 61 6c 75 65 50 72 |sGet_Dem|oValuePr|
|00000f90| 6f 63 50 74 72 28 29 3b | 0d 09 65 6c 73 65 0d 09 |ocPtr();|..else..|
|00000fa0| 09 72 65 74 75 72 6e 20 | 30 4c 3b 0d 7d 0d 0d 70 |.return |0L;.}..p|
|00000fb0| 61 73 63 61 6c 20 50 74 | 72 20 47 65 74 5f 44 65 |ascal Pt|r Get_De|
|00000fc0| 6d 6f 53 74 72 69 6e 67 | 28 76 6f 69 64 29 0d 7b |moString|(void).{|
|00000fd0| 0d 09 73 74 61 74 69 63 | 20 47 65 74 5f 44 65 6d |..static| Get_Dem|
|00000fe0| 6f 53 74 72 69 6e 67 50 | 72 6f 63 50 74 72 09 73 |oStringP|rocPtr.s|
|00000ff0| 47 65 74 5f 44 65 6d 6f | 53 74 72 69 6e 67 50 72 |Get_Demo|StringPr|
|00001000| 6f 63 50 74 72 20 3d 20 | 6b 55 6e 72 65 73 6f 6c |ocPtr = |kUnresol|
|00001010| 76 65 64 43 46 72 61 67 | 53 79 6d 62 6f 6c 41 64 |vedCFrag|SymbolAd|
|00001020| 64 72 65 73 73 3b 0d 0d | 09 2f 2f 20 69 66 20 74 |dress;..|.// if t|
|00001030| 68 69 73 20 61 64 64 72 | 65 73 73 20 68 61 73 20 |his addr|ess has |
|00001040| 6e 6f 74 20 62 65 65 6e | 20 73 65 74 75 70 20 79 |not been| setup y|
|00001050| 65 74 c9 0d 09 69 66 20 | 28 28 50 74 72 29 20 73 |et...if |((Ptr) s|
|00001060| 47 65 74 5f 44 65 6d 6f | 53 74 72 69 6e 67 50 72 |Get_Demo|StringPr|
|00001070| 6f 63 50 74 72 20 3d 3d | 20 28 50 74 72 29 20 6b |ocPtr ==| (Ptr) k|
|00001080| 55 6e 72 65 73 6f 6c 76 | 65 64 43 46 72 61 67 53 |Unresolv|edCFragS|
|00001090| 79 6d 62 6f 6c 41 64 64 | 72 65 73 73 29 0d 09 09 |ymbolAdd|ress)...|
|000010a0| 46 69 6e 64 5f 53 79 6d | 62 6f 6c 28 28 50 74 72 |Find_Sym|bol((Ptr|
|000010b0| 2a 29 20 26 73 47 65 74 | 5f 44 65 6d 6f 53 74 72 |*) &sGet|_DemoStr|
|000010c0| 69 6e 67 50 72 6f 63 50 | 74 72 2c 22 5c 70 47 65 |ingProcP|tr,"\pGe|
|000010d0| 74 5f 44 65 6d 6f 53 74 | 72 69 6e 67 22 2c 6b 47 |t_DemoSt|ring",kG|
|000010e0| 65 74 5f 44 65 6d 6f 53 | 74 72 69 6e 67 50 72 6f |et_DemoS|tringPro|
|000010f0| 63 49 6e 66 6f 29 3b 0d | 09 69 66 20 28 28 50 74 |cInfo);.|.if ((Pt|
|00001100| 72 29 20 73 47 65 74 5f | 44 65 6d 6f 53 74 72 69 |r) sGet_|DemoStri|
|00001110| 6e 67 50 72 6f 63 50 74 | 72 20 21 3d 20 28 50 74 |ngProcPt|r != (Pt|
|00001120| 72 29 20 6b 55 6e 72 65 | 73 6f 6c 76 65 64 43 46 |r) kUnre|solvedCF|
|00001130| 72 61 67 53 79 6d 62 6f | 6c 41 64 64 72 65 73 73 |ragSymbo|lAddress|
|00001140| 29 0d 09 09 72 65 74 75 | 72 6e 20 73 47 65 74 5f |)...retu|rn sGet_|
|00001150| 44 65 6d 6f 53 74 72 69 | 6e 67 50 72 6f 63 50 74 |DemoStri|ngProcPt|
|00001160| 72 28 29 3b 0d 09 65 6c | 73 65 0d 09 09 72 65 74 |r();..el|se...ret|
|00001170| 75 72 6e 20 30 4c 3b 0d | 7d 0d 00 00 00 00 00 00 |urn 0L;.|}.......|
|00001180| 00 00 01 00 00 00 01 76 | 00 00 00 76 00 00 00 52 |.......v|...v...R|
|00001190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011b0| 0d 44 65 6d 6f 4c 69 62 | 47 6c 75 65 2e 63 02 00 |.DemoLib|Glue.c..|
|000011c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011f0| 00 00 ae 95 2b 97 00 00 | 10 fa 00 00 01 c8 00 00 |....+...|........|
|00001200| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001210| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001260| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001270| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001280| 00 00 00 1e 00 58 00 05 | 03 60 02 85 00 58 00 05 |.....X..|.`...X..|
|00001290| 03 60 02 85 00 00 00 56 | 00 00 00 00 00 00 00 00 |.`.....V|........|
|000012a0| 00 00 00 00 00 48 00 09 | 4d 6f 6e 61 63 6f 00 00 |.....H..|Monaco..|
|000012b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012c0| 00 00 00 00 00 00 00 00 | 00 03 00 04 00 58 00 05 |........|.....X..|
|000012d0| 03 60 02 85 00 58 00 05 | 03 60 02 85 ae 7f f1 61 |.`...X..|.`.....a|
|000012e0| 00 00 0a 01 00 00 0a 01 | 00 00 06 1a 01 00 00 00 |........|........|
|000012f0| 00 04 00 01 00 01 00 00 | 01 00 00 00 01 76 00 00 |........|.....v..|
|00001300| 00 76 00 00 00 52 01 d3 | ad b0 1f 38 00 00 00 1c |.v...R..|...8....|
|00001310| 00 52 00 01 4d 50 53 52 | 00 01 00 12 4d 57 42 42 |.R..MPSR|....MWBB|
|00001320| 00 00 00 2a 03 f0 ff ff | 00 00 00 00 00 00 00 00 |...*....|........|
|00001330| 03 ed ff ff 00 00 00 22 | 00 00 00 00 03 f0 ff ff |......."|........|
|00001340| 00 00 00 6e 00 00 00 00 | 00 00 00 00 00 00 00 00 |...n....|........|
|00001350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+